Documentation for class point

Inherits from 	basic_object 

Properties declared in point 

Class Methods declared in point 
	new(x, y) 

Methods declared in point 
	any 
		duplicate 
		height 
		rename(name) 
		set(x, y) 
		set_x(x) 
		set_y(y) 
		width 
		x 
		y 

Class 
#begin_class
point 
The class point is a sub-class of the class basic_object. 
A point consists of a x and a y coordinate. Sometimes a point object are used to represent a size. The x and y coordinates can then be used as width and height.
The syntax of a point at (10, 20) would be:
{10 20}
#end_class

Properties 

Methods 

#begin_method
duplicate 
Returns a new point object that has the same x and y coordinates as the receiving point object.
#end_method

#begin_method
height 
Returns the y coordinate of the point. This method is only used if the point is used to represent a size.
#end_method

#begin_method
rename(name) 
Sets the name of the point object to the symbol name.
Ex:
p := {10 20}
p:rename(#my_point)
The point a can now also be referred to as
{point my_point}
and returns {10 20}
#end_method

#begin_method
set(x, y) 
Sets the x and y coordinate of the point object.
Returns self.
Ex:
p := {10 20}
p:set(30, 40)
returns {30 40}
#end_method

#begin_method
set_x(x) 
Sets the x coordinate of the point object to x.
Returns self.
Ex:
p := {10 20}
p:set_x(100)
returns {100 20}
#end_method

#begin_method
set_y(y) 
Sets the y coordinate of the point object to x.
Returns self.
Ex:
p := {10 20}
p:set_y(100)
returns {10 100}
#end_method

#begin_method
width 
Returns the x coordinate of the point. This method is only used if the point is used to represent a size.
#end_method

#begin_method
x 
Returns the x coordinate of the point.
#end_method

#begin_method
y 
Returns the y coordinate of the point.
#end_method

Class Methods 

#begin_class_method
new(x, y) 
Returns a new point object.
Ex:
{point}:new(10, 20)
returns {10 20}
#end_class_method